package com.pmcc.cj.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.pmcc.core.entity.UUIDEntity;
import com.pmcc.utils.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 机手飞防任务单  特质订单
 * Created by tomas on 2020/9/5.
 */
@Entity
@Table(name = "cj_robot_task")
public class CjRobotTask extends UUIDEntity {
    @Column(name = "robot_id")
    private String robotId;//机手id
    @Column(name = "customer_id")
    private String customerId;//发布人id
    @Column(name = "customer_name")
    private String customerName;//发布人姓名
    @Column(name = "cellphone")
    private String cellphone;//发布人电话
    @Column(name = "business_id")
    private String businessId;//客户订单id
    @Column(name = "province")
    private String province;//任务所在的省
    @Column(name = "city")
    private String city;//任务所在的市
    @Column(name = "county")
    private String county;//任务所在的县
    @Column(name = "address")
    private String address;//任务所在的详细地址
    @Column(name = "salesman_id")
    private String salesmanId;//零售商id
    @Column(name = "xx")
    private Double xx;//发布人经度坐标
    @Column(name = "yy")
    private Double yy;//发布人纬度坐标
    //订单状态 0：初始化    1：已派发（派发之后就进入任务表）
    @Column(name = "fettle")
    private Integer fettle;
    @Column(name = "money")
    private BigDecimal money;//订单金额（单价）
    @Column(name = "number")
    private Double number;//亩数（最小值50）
    @Column(name = "is_issued")
    private Boolean isIssued;//是否自动分配给零售商
    @Column(name = "crop_type")
    private String cropType;//农作物类型（不给字典，小麦玉米等名字）
    @Column(name = "medicine_type")
    private String medicineType;//药剂类型（文本，汉字）
    @Column(name = "begin_time")
    private Date beginTime;//作业时间
    @Column(name = "cycle_time")
    private Integer cycleTime;//预计周期 （天）
    @Column(name = "remark")
    private String remark;//订单备注
    @Column(name = "create_time")
    private Date createTime;
    //发布押金

   @Transient
   private String begin;//临时时间字段

//    @Column(name = "is_special")
//    private Boolean isSpecial;//是否为特质订单




    public String getCellphone() {
        return cellphone;
    }

    public void setCellphone(String cellphone) {
        this.cellphone = cellphone;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getCycleTime() {
        return cycleTime;
    }

    public void setCycleTime(Integer cycleTime) {
        this.cycleTime = cycleTime;
    }

    @JsonSerialize(using = DateTimeFormat.class)
    public Date getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(Date beginTime) {
        this.beginTime = beginTime;
    }

    public String getCropType() {
        return cropType;
    }

    public void setCropType(String cropType) {
        this.cropType = cropType;
    }

    public String getMedicineType() {
        return medicineType;
    }

    public void setMedicineType(String medicineType) {
        this.medicineType = medicineType;
    }

    public String getRobotId() {
        return robotId;
    }

    public void setRobotId(String robotId) {
        this.robotId = robotId;
    }

    public String getCustomerId() {
        return customerId;
    }

    public void setCustomerId(String customerId) {
        this.customerId = customerId;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public String getBusinessId() {
        return businessId;
    }

    public void setBusinessId(String businessId) {
        this.businessId = businessId;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getCounty() {
        return county;
    }

    public void setCounty(String county) {
        this.county = county;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getSalesmanId() {
        return salesmanId;
    }

    public void setSalesmanId(String salesmanId) {
        this.salesmanId = salesmanId;
    }

    public Double getXx() {
        return xx;
    }

    public void setXx(Double xx) {
        this.xx = xx;
    }

    public Double getYy() {
        return yy;
    }

    public void setYy(Double yy) {
        this.yy = yy;
    }

    public Integer getFettle() {
        return fettle;
    }

    public void setFettle(Integer fettle) {
        this.fettle = fettle;
    }

    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    public Double getNumber() {
        return number;
    }

    public void setNumber(Double number) {
        this.number = number;
    }

    public Boolean getIssued() {
        return isIssued;
    }

    public void setIssued(Boolean issued) {
        isIssued = issued;
    }
    @JsonSerialize(using = DateTimeFormat.class)
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getBegin() {
        return begin;
    }

    public void setBegin(String begin) {
        this.begin = begin;
    }
}
